﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;

namespace eKanbanWPF.View
{
    public class MemberNameValidator : ValidationRule
    {
        public override ValidationResult Validate(object value, System.Globalization.CultureInfo cultureInfo)
        {
            if (value == null || (value is string && ((string)value).Trim().Length == 0))
            {
                return new ValidationResult(false, "Member name cannot be empty.");
            }

            return new ValidationResult(true, null);
        }
    }
}
